package fallback;

import com.lyb.domian.User;
import feignclients.UserFeignClient;
import org.springframework.stereotype.Component;

//托底类：必须要实现Feign接口
@Component
public class UserFeignClientFallback implements UserFeignClient {

    //拖地方法
    @Override
    public User getUserById(Long id) {
        return new User(-1L,"没有此用户");
    }
}
